<% if (user) { %>
<div class="person_div">
  <p><img src=/images/<%= user.picUrl %> alt="userpic"></p>
  <p>
    <a href="/user"><span>个人中心</span></a>
    <a href="/logout"><span>退出</span></a>
  </p>
  <a href="/user"><p class="person_p" style="padding: 0 12px 0 20px;text-align: left;margin-top: -10px;"><%= user.personal %></p></a>
</div>
<% } else { %>
  <ul class="menu_btn">
    <li><a class="dis_a" href="/post"><span class="glyphicon glyphicon-pencil"></span> 写日志 </a></li>
    <li><a class="dis_a" href="javaScript:;"><span class="glyphicon glyphicon-fire"></span>热  门 </a></li>
    <li><a class="dis_a" style="border: none" href="/archive" title="存档"> 最  新 </a></li>
  </ul>
<% } %>

<script>
  $(function () {
    $('.menu_btn li a').hover(function () {
      $(this).addClass('current').siblings().removeClass('current')
    },function () {
      $(this).removeClass('current')
    })
  })
</script>

